package org.dromara.hm.enums;

/**
 *  出入库类型
 * @Author If404 Hzy
 * @Date 2025-2025/3/11-10:11
 * @Version 1.0
 */
public enum ReceiptIssueRecordTypeEnum
{
    OUTBOUND(1, "出库"),
    SELF_ADDED_RECEIPT(2, "自增入库"),
    INBOUND(3, "跨店入库"),
    EMPLOYEE_BENEFITS(4, "员工福利"),
    CUSTOMER_GIFTS(5, "客户赠品"),
    FRINGE_MARKET(6, "外围市场"),
    ;

    private final int code;
    private final String description;

    ReceiptIssueRecordTypeEnum(int code, String description) {
        this.code = code;
        this.description = description;
    }

    public String getCode() {
        return code+"";
    }

    public String getDescription() {
        return description;
    }

    public static ReceiptIssueRecordTypeEnum getByCode(int code) {
        for (ReceiptIssueRecordTypeEnum type : values()) {
            if (type.code == code) {
                return type;
            }
        }
        return null;
    }
}
